Skip to content

ci: add v* tag release pipeline for universal binaries#21

Open
linhay wants to merge 6 commits intolynnswap:mainfrom
linhay:feat/release-ci
Open

ci: add v* tag release pipeline for universal binaries#21
linhay wants to merge 6 commits intolynnswap:mainfrom
linhay:feat/release-ci

Conversation

@linhay
Copy link

@linhay linhay commented Mar 3, 2026

Summary

  • add GitHub Actions release workflow triggered by v* tags
  • build arm64 (macos-14) and x86_64 (macos-13) artifacts, then merge with lipo
  • publish xcode-mcp-proxy_<tag>_darwin_universal.tar.gz and SHA256SUMS.txt
  • add helper scripts for staging binaries and packaging universal release assets
  • document release-based installation in README

Why

Downstream apps need stable, machine-consumable release artifacts for auto-install/update flows.

Validation

  • swift test
  • swift build -c release --product xcode-mcp-proxy
  • swift build -c release --product xcode-mcp-proxy-server
  • swift build -c release --product xcode-mcp-proxy-install
  • scripts/build-release.sh --arch arm64 --version v0.0.0-local --dist-root dist
  • bash -n scripts/build-release.sh
  • bash -n scripts/package-universal.sh

Notes

  • Local machine cannot produce a real x86_64 build artifact, so universal packaging is verified in CI via split runners.

Copilot AI review requested due to automatic review settings March 3, 2026 08:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a tag-triggered GitHub Actions release pipeline that builds per-arch macOS executables, merges them into a universal binary set, and publishes machine-consumable release assets for downstream auto-install/update flows.

Changes:

  • Introduces v* tag-based GitHub Actions workflow to test, build arm64/x86_64 artifacts, merge with lipo, and publish a GitHub Release.
  • Adds helper scripts to stage per-arch release binaries and package universal tarball + SHA256 sums.
  • Documents GitHub Releases-based installation and ignores generated dist/ and release/ directories.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/package-universal.sh Merges staged arm64/x86_64 binaries with lipo, tars them, and writes SHA256SUMS.txt.
scripts/build-release.sh Builds SwiftPM release products and stages them under dist/<arch>/bin with a manifest.
README.md Adds installation instructions for downloading and verifying GitHub Release assets.
.gitignore Ignores generated dist/ and release/ output directories.
.github/workflows/release.yml Implements tag-triggered CI: test, per-arch build, universal packaging, and GitHub Release publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

```bash
VERSION=v0.1.0
ASSET="xcode-mcp-proxy_${VERSION}_darwin_universal.tar.gz"
BASE_URL="https://github.com/<owner>/XcodeMCPKit/releases/download/${VERSION}"
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The download URL uses a literal <owner> placeholder, so the example commands will fail as written. Replace this with the real repository owner/org (or use a placeholder pattern that matches GitHub’s actual URL structure, e.g. <OWNER>/<REPO>), and ensure the repo name matches the actual GitHub repo slug users should install from.

Suggested change
BASE_URL="https://github.com/<owner>/XcodeMCPKit/releases/download/${VERSION}"
BASE_URL="https://github.com/<OWNER>/XcodeMCPKit/releases/download/${VERSION}"

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +82
case "$arch" in
arm64|x86_64) ;;
*)
echo "Unsupported arch: $arch (expected arm64 or x86_64)" >&2
exit 1
;;
esac

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if [[ "$dist_root" = /* ]]; then
dist_base="$dist_root"
else
dist_base="$repo_root/$dist_root"
fi

out_dir="$dist_base/$arch"
bin_out="$out_dir/bin"
products=(
"xcode-mcp-proxy"
"xcode-mcp-proxy-server"
"xcode-mcp-proxy-install"
)

pushd "$repo_root" >/dev/null

for product in "${products[@]}"; do
swift build -c release --product "$product"
done
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--arch is only used to choose the output directory/manifest and is not used to control or validate the architecture produced by swift build. This can silently stage binaries that don’t match the requested arch (e.g., if run on an unexpected runner). Consider either inferring arch from uname -m, passing an explicit build option (like --arch/--triple if supported in your SwiftPM version), and/or validating the produced binaries (e.g., lipo -info/file) and failing if they don’t match.

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +47
build-x86_64:
name: Build (x86_64)
needs: test
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build release binaries
run: scripts/build-release.sh --arch x86_64 --version "${GITHUB_REF_NAME}" --dist-root dist

Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow builds the x86_64 slice on macos-13, but this repo’s Package.swift declares // swift-tools-version: 6.2 and platforms: [.macOS(.v15)]. Unless the job installs/selects a Swift 6.2 / Xcode 16 toolchain, swift build on macos-13 is likely to fail due to an incompatible default toolchain/SDK. Consider selecting an explicit Xcode version in the workflow (e.g., via xcode-select/a setup action) or adjusting the runner strategy so the x86_64 job uses a runner with a compatible toolchain.

Copilot uses AI. Check for mistakes.
@linhay
Copy link
Author

linhay commented Mar 3, 2026

Update: validated release pipeline on fork with tag .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants